From 382cc81163c5b9fd9e6800a31846810794e451e0 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Mon, 21 Jan 2002 17:04:47 +0000 Subject: [PATCH] Trap the case where there is no default widget and the entry is the focus Mon Jan 21 11:56:31 2002 Owen Taylor * gtk/gtkentry.c (gtk_entry_real_activate): Trap the case where there is no default widget and the entry is the focus widget, since this also causes infinite recursion. (#69158) --- ChangeLog | 7 +++++++ ChangeLog.pre-2-0 | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-2 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtkentry.c | 4 +++- 8 files changed, 52 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8d15a4bd8a..5d3fdf389e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon Jan 21 11:56:31 2002 Owen Taylor + + * gtk/gtkentry.c (gtk_entry_real_activate): Trap the + case where there is no default widget and the entry + is the focus widget, since this also causes infinite + recursion. (#69158) + Mon Jan 21 11:46:39 2002 Owen Taylor * gdk/gdk.c (gdk_init_check): Set the fallback program class here, diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 8d15a4bd8a..5d3fdf389e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Mon Jan 21 11:56:31 2002 Owen Taylor + + * gtk/gtkentry.c (gtk_entry_real_activate): Trap the + case where there is no default widget and the entry + is the focus widget, since this also causes infinite + recursion. (#69158) + Mon Jan 21 11:46:39 2002 Owen Taylor * gdk/gdk.c (gdk_init_check): Set the fallback program class here, diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 8d15a4bd8a..5d3fdf389e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Mon Jan 21 11:56:31 2002 Owen Taylor + + * gtk/gtkentry.c (gtk_entry_real_activate): Trap the + case where there is no default widget and the entry + is the focus widget, since this also causes infinite + recursion. (#69158) + Mon Jan 21 11:46:39 2002 Owen Taylor * gdk/gdk.c (gdk_init_check): Set the fallback program class here, diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 8d15a4bd8a..5d3fdf389e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Mon Jan 21 11:56:31 2002 Owen Taylor + + * gtk/gtkentry.c (gtk_entry_real_activate): Trap the + case where there is no default widget and the entry + is the focus widget, since this also causes infinite + recursion. (#69158) + Mon Jan 21 11:46:39 2002 Owen Taylor * gdk/gdk.c (gdk_init_check): Set the fallback program class here, diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 8d15a4bd8a..5d3fdf389e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Mon Jan 21 11:56:31 2002 Owen Taylor + + * gtk/gtkentry.c (gtk_entry_real_activate): Trap the + case where there is no default widget and the entry + is the focus widget, since this also causes infinite + recursion. (#69158) + Mon Jan 21 11:46:39 2002 Owen Taylor * gdk/gdk.c (gdk_init_check): Set the fallback program class here, diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 8d15a4bd8a..5d3fdf389e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Mon Jan 21 11:56:31 2002 Owen Taylor + + * gtk/gtkentry.c (gtk_entry_real_activate): Trap the + case where there is no default widget and the entry + is the focus widget, since this also causes infinite + recursion. (#69158) + Mon Jan 21 11:46:39 2002 Owen Taylor * gdk/gdk.c (gdk_init_check): Set the fallback program class here, diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 8d15a4bd8a..5d3fdf389e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Mon Jan 21 11:56:31 2002 Owen Taylor + + * gtk/gtkentry.c (gtk_entry_real_activate): Trap the + case where there is no default widget and the entry + is the focus widget, since this also causes infinite + recursion. (#69158) + Mon Jan 21 11:46:39 2002 Owen Taylor * gdk/gdk.c (gdk_init_check): Set the fallback program class here, diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 77c04a9020..1d1f7d8c35 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -2229,7 +2229,9 @@ gtk_entry_real_activate (GtkEntry *entry) { window = GTK_WINDOW (toplevel); - if (window && window->default_widget != widget) + if (window && + widget != window->default_widget && + !(!window->default_widget && widget == window->focus_widget)) gtk_window_activate_default (window); } } -- 2.30.2